<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/m/include/init_mobile.jsp" %>
<%@ page import="com.qbooks.board.*" %>
<%
	String ip_addr			= request.getRemoteAddr();
	String word_id			= StringUtil.nvl(request.getParameter("word_id"));
	String curr_page 		= StringUtil.nvl(request.getParameter("curr_page"), "1");

	String search_url		= "";
	
	BoardDAO dao 		= new BoardDAO();
	
	HashMap infos = new HashMap();
	infos.put("word_id",		word_id);
	infos.put("curr_page",		curr_page);

	
	HashList wordInfo		= dao.selectWordInfo(infos);
	HashList commentList 	= dao.selectCommentList(infos);
	
	if (!ip_addr.equals(wordInfo.get("ip_addr",0))) {
		infos.put("job_type", "UC");	//조회수 증가
		dao.saveWord(infos);
	}
	
	
	String board_id			= wordInfo.get("board_id",0);
	

%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	<title><%= HOME_NAME %></title>
	<%@ include file="/m/include/cssnjs.jsp"  %>
	
	
	<script type="text/javascript">
	$(document).ready(function() {
		$('#header-nav li:nth-child(4)').addClass('on');
	});
	</script>
	
</head>
<body>
    <div id="wrap">
		<%@ include file="/m/include/header.jsp"  %>
        <div id="word_info">
        
        	<h3><%= wordInfo.get("subject",0) %></h3>
        	<p><%= wordInfo.get("init_date",0) %> 조회 <%= wordInfo.get("count",0) %></p>
			
			<div>
<%		if ("Y".equals(wordInfo.get("html_yn",0))) { %>
			<%= wordInfo.get("content",0) %>
<%		} else { %>
			<%= StringUtil.toHTML(wordInfo.get("content",0)) %>
<%		} %>
			</div>
			
			<div class="buttons">
				<a href="./wordList.jsp?os=<%=os%>&board_id=<%=board_id %>" class="btn" title="목록으로" >목록으로</a>
			</div>
        </div>
        	

  	</div>
</body>
</html>
